package com.cryptoneedle.center.source.key;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>description:  </p>
 *
 * @author CryptoNeedle
 * @date 2025-09-25
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString
@Schema(name = "数据库唯一键")
public class DatabaseKey implements Serializable {

    @NotBlank(message = "目录名称不能为空")
    @Size(max = 512, message = "目录名称长度不能超过512个字符")
    @Schema(name = "目录名称", description = "目录名称，最大长度512字符")
    private String catalogName;

    @NotBlank(message = "数据库名称不能为空")
    @Size(max = 64, message = "数据库名称长度不能超过64个字符")
    @Schema(name = "数据库名称", description = "数据库名称，最大长度64字符")
    private String databaseName;
}